import { JSONValue } from "./kv";

export function json(json:JSONValue, status:number=200): Response {
    return new Response(JSON.stringify(json), {
        "status": status,
        "headers": {
            "Content-Type": "application/json"
        }
    });
}